import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../views/Login";

Vue.use(VueRouter)

const routes = [
    {
        path: '/home',
        name: '首页',
        component: () => import('../layout/index'),
        children: [
            {
                path: '/userCenter',
                name: '个人中心',
                component: () => {
                    import('../views/userCenter/index')
                }
            }
        ]
    },
    {
        path: '/login',
        name: '登录页',
        component: () => import('../views/Login')
    }
]

const router = new VueRouter({
    routes
})

export default router
